﻿#region
/* ===============================================
 * 作者：guopeng           时间：2012/5/5 15:07:02
 * 
 * 
 * 类描述：
 * 
 * 
 * =============================================== */
#endregion

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using ueEngine.Biz.Inf.Entities.DBSupport;
using ueEngine.Framework.Exception;

namespace ueEngine.Biz.Inf.Entities
{
    [Table("Talent")]
    public class Talent : BaseEntity<Talent>
    {
        public Talent() { }
        public override Talent Get(System.Linq.Expressions.Expression<Func<Talent, bool>> where)
        {
            using (Context ctx = new Context())
            {
                var item = ctx.Talent.FirstOrDefault(where);
                if (item != null)
                {
                    this.Id = item.Id;
                    this.Recruiter = item.Recruiter;
                    this.ResumeId = item.ResumeId;
                    return this;
                }
                return null;
            }
        }
        [Column(TypeName="int")]
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }

        [Column(TypeName="nvarchar")]
        [StringLength(200)]
        public string Recruiter { get; set; }

        [Column(TypeName="int")]
        public int ResumeId { get; set; }
    }
}
